﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;

namespace Phys.Model.Affectors {
	public class MaterialAffector : IAffector{
		public Color Color { get; set; }
		public static readonly double DefaultElasticity = 0;
		public double Elasticity = DefaultElasticity;
		public void Affect(IObject o, double seconds) {	}

		internal static double GetElasticity(IObject obj) {
			MaterialAffector aff = obj.Affectors.OfType<MaterialAffector>().SingleOrDefault();
			return aff != null ? aff.Elasticity : DefaultElasticity;
		}
	}
}